xen.git
20 years agoFixed 64 bit Linux build.
jrb44@plym.cl.cam.ac.uk [Thu, 13 Oct 2005 19:16:02 +0000 (20:16 +0100)]
Fixed 64 bit Linux build.

Fixes from Ian Pratt. extern declaration of bind_ipi was out of sync with
the definition of the function.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoBecause of a bug with reference counting against the target guest page
kaf24@firebug.cl.cam.ac.uk [Thu, 13 Oct 2005 16:58:01 +0000 (17:58 +0100)]
Because of a bug with reference counting against the target guest page
when searching the list for L1 shadow pages to write protect that page
(at shadow_promote(), which is called by alloc_shadow_page()), the code
was always scanning _all_ the entries in the hash list. The length of
the hash list can be >500 for L1 shadow pages, and for each page we
needed to check all the PTEs in the page.

The patch attached does the following things:
- Correct the reference count (for the target guest page) so that=20
  it can exit the loop when all the L1 shadow pages to modify are found.
  Even with this, we can search the entire list if the page is at=20
  the end.
- Try to avoid the search in the hash list, by having a
  back pointer (as a hint) to the shadow page pfn. For most cases,=20
  there is a single translation for the guest page in the shadow.
- Cleanups, remove the nested function fix_entry

With those, the kernel build performance, for example, was improved
approximately by 20%, 40% on 32-bit, 64-bit unmodified Linux guests,
respectively. Tested log-dirty mode for plain 32-bit as well.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
20 years agoRevert accidental commit.
emellor@leeni.uk.xensource.com [Thu, 13 Oct 2005 16:55:15 +0000 (17:55 +0100)]
Revert accidental commit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 13 Oct 2005 16:51:35 +0000 (17:51 +0100)]
Merged.

20 years agoRemove the diagnostic/recovery when two domains end up with the same name. It
emellor@leeni.uk.xensource.com [Thu, 13 Oct 2005 16:49:56 +0000 (17:49 +0100)]
Remove the diagnostic/recovery when two domains end up with the same name.  It
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoCleanup CPU hotplug and save/restore. Next step is to
kaf24@firebug.cl.cam.ac.uk [Thu, 13 Oct 2005 16:08:59 +0000 (17:08 +0100)]
Cleanup CPU hotplug and save/restore. Next step is to
simplify SMP initial boot and then should be easy to merge
i386 and x86/64 smpboot.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerge.
emellor@leeni.uk.xensource.com [Thu, 13 Oct 2005 14:26:44 +0000 (15:26 +0100)]
Merge.

20 years agoFix broken test for zombies.
emellor@leeni.uk.xensource.com [Thu, 13 Oct 2005 14:25:42 +0000 (15:25 +0100)]
Fix broken test for zombies.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix multi-cpu save/restore after the max_vcpu patch.
kaf24@firebug.cl.cam.ac.uk [Thu, 13 Oct 2005 14:19:29 +0000 (15:19 +0100)]
Fix multi-cpu save/restore after the max_vcpu patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix client dependency on libxenstore in Makefile.
kaf24@firebug.cl.cam.ac.uk [Thu, 13 Oct 2005 10:12:11 +0000 (11:12 +0100)]
Fix client dependency on libxenstore in Makefile.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoNS_PER_TICK must be a s64 quantity. It is compared with
kaf24@firebug.cl.cam.ac.uk [Thu, 13 Oct 2005 07:38:49 +0000 (08:38 +0100)]
NS_PER_TICK must be a s64 quantity. It is compared with
possibly -ve values which we do not want to 'promote' to
big +ve values.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoCurrently, we mark an IO request to STATE_IOREQ_READY state before
kaf24@firebug.cl.cam.ac.uk [Thu, 13 Oct 2005 07:06:27 +0000 (08:06 +0100)]
Currently, we mark an IO request to STATE_IOREQ_READY state before
calling IO handlers in xen HV, i.e. vmx_portio_intercept or
vmx_mmio_intercept.  Actually, STATE_IOREQ_READY means it's ready for
DM handling, only if IO handlers in xen HV won't handle it, it should
be passed to DM. This patch fixes this issue.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Nakajima Jun <nakajima.jun@intel.com>
20 years agoAdd memory barriers to console ring accesses. Similar to what
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 20:10:14 +0000 (21:10 +0100)]
Add memory barriers to console ring accesses. Similar to what
Rusty uses for xenbus messaging.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoDisable watch callbacks only during driver registration instead of all probes.
cl349@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 19:58:51 +0000 (20:58 +0100)]
Disable watch callbacks only during driver registration instead of all probes.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoDisable watch callbacks while running the driver probe callback.
cl349@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 17:43:26 +0000 (18:43 +0100)]
Disable watch callbacks while running the driver probe callback.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoChange xenstore-domain messaging protocol to match what we use
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 17:25:40 +0000 (18:25 +0100)]
Change xenstore-domain messaging protocol to match what we use
for other inter-domain comms (power-of-two-sized rings, and
free-running indexes). The interface is defined in the spirit of
the console protocol, so maybe some chance of merging them
together later?

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix xsls build dependency.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 17:18:43 +0000 (18:18 +0100)]
Fix xsls build dependency.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd a option for enabling ne2000 NIC device model
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 16:04:11 +0000 (17:04 +0100)]
Add a option for enabling ne2000 NIC device model

Signed-off-by: Yan Li <yanx.li@intel.com>
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
20 years agoRefactor domain/vcpu allocation to be more separated.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 16:01:38 +0000 (17:01 +0100)]
Refactor domain/vcpu allocation to be more separated.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years ago Keir moved barriers,
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 16:00:29 +0000 (17:00 +0100)]
    Keir moved barriers,
        Competence questions are raised:
        Correctness withers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
20 years agoFix error output to stderr in xc_linux_build.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 15:42:35 +0000 (16:42 +0100)]
Fix error output to stderr in xc_linux_build.
Signed-off-by: Scott Parish <srparish@us.ibm.com>
20 years agoNew dom0_op to set max vcpus for a domain.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 15:34:49 +0000 (16:34 +0100)]
New dom0_op to set max vcpus for a domain.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix 64-bit compile warnings in firmware.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 15:15:02 +0000 (16:15 +0100)]
Fix 64-bit compile warnings in firmware.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@ewan [Wed, 12 Oct 2005 12:21:06 +0000 (13:21 +0100)]
Merged.

20 years agoMerged.
emellor@ewan [Wed, 12 Oct 2005 12:20:10 +0000 (13:20 +0100)]
Merged.

20 years agoMake the error reporting back to xm just a little bit less insane, and fix a
emellor@ewan [Wed, 12 Oct 2005 12:13:32 +0000 (13:13 +0100)]
Make the error reporting back to xm just a little bit less insane, and fix a
missing import inside blkif.  Fix the command parsing for op_device_destroy and
op_device_configure -- the device IDs should be strings, to allow the user to
specify devices by name as well as number.

This is the second half to the fixes for bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 12:06:35 +0000 (13:06 +0100)]
merge

20 years agoFix firmware build for cross-compilation.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 12:03:10 +0000 (13:03 +0100)]
Fix firmware build for cross-compilation.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoIgnore any watches that fire for which we do not have a registration. This can
emellor@ewan [Wed, 12 Oct 2005 12:00:55 +0000 (13:00 +0100)]
Ignore any watches that fire for which we do not have a registration.  This can
happen if there are watches in flight at the same time as a deregistration, and
also seems to happen spuriously on xend restart.

This fixes the Invalid token error that has been seen on xend restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDon't try and call DevController if we can't destroy a device ourselves,
emellor@ewan [Wed, 12 Oct 2005 11:56:52 +0000 (12:56 +0100)]
Don't try and call DevController if we can't destroy a device ourselves,
because we are already inside the ValueError exception handler, so we know that
the give device identifier is not an integer, and DevController.destroyDevice
only accepts integers.  Fixes bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoImprove error message.
emellor@ewan [Wed, 12 Oct 2005 11:54:43 +0000 (12:54 +0100)]
Improve error message.

20 years agoExplicitly state which architectures are going to use /usr/lib64, to allow for
emellor@ewan [Wed, 12 Oct 2005 11:04:45 +0000 (12:04 +0100)]
Explicitly state which architectures are going to use /usr/lib64, to allow for
the fact that Itanium does not.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix the handling of EAGAIN from the transaction_end; we were failing to do any
emellor@ewan [Wed, 12 Oct 2005 11:03:03 +0000 (12:03 +0100)]
Fix the handling of EAGAIN from the transaction_end; we were failing to do any
work if the transaction caused a retry, because optind had been obliterated.
Achieve this by splitting the main body of the loop off to a separate function,
meaning that we get rid of the goto out at the same time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded missing __init__.py.
emellor@ewan [Wed, 12 Oct 2005 10:51:52 +0000 (11:51 +0100)]
Added missing __init__.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix vcpu-hotplug xenbus watch handler and setup.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 10:47:16 +0000 (11:47 +0100)]
Fix vcpu-hotplug xenbus watch handler and setup.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoBetter cast for ptr->int in residerfs module.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 10:13:00 +0000 (11:13 +0100)]
Better cast for ptr->int in residerfs module.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix Xen public interfaces and the tools to consistently
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 10:07:37 +0000 (11:07 +0100)]
Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix deadlock in XendDomainInfo when a domain is cleaned up. We are renaming
emellor@ewan [Wed, 12 Oct 2005 09:11:35 +0000 (10:11 +0100)]
Fix deadlock in XendDomainInfo when a domain is cleaned up.  We are renaming
the domain, to make it clear that it is a zombie, but this renaming cannot
check the uniqueness of the new name, because this causes a deadlock with
XendDomain.  Instead, we allow the name to be non-unique for the case of
zombie domains.

Change the locking in waitForShutdown and state_set to be robust in the face of
exceptions.

Rename the STATE_VM_ constants to STATE_DOM_.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange import that was confusing pylint (this is a pylint bug, I think).
emellor@ewan [Wed, 12 Oct 2005 09:08:01 +0000 (10:08 +0100)]
Change import that was confusing pylint (this is a pylint bug, I think).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoIssue diagnostics if xm is being run as a non-root user. This used to happen,
emellor@ewan [Wed, 12 Oct 2005 09:07:04 +0000 (10:07 +0100)]
Issue diagnostics if xm is being run as a non-root user.  This used to happen,
but the triggering error has moved, so the diagnostics were broken.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix compilation problems with xenstore.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 08:34:27 +0000 (09:34 +0100)]
Fix compilation problems with xenstore.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
20 years agoThis patch implements select() functionality on /dev/vtpm and fixes some
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 08:33:03 +0000 (09:33 +0100)]
This patch implements select() functionality on /dev/vtpm and fixes some
other problems.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoFix PAE overflow in xc_linux_build.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 08:31:53 +0000 (09:31 +0100)]
Fix PAE overflow in xc_linux_build.
Signed-off-by: srparish@us.ibm.com
20 years agoError print on err path.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 08:29:52 +0000 (09:29 +0100)]
Error print on err path.
Signed-off-by: srparish@us.ibm.com
20 years agoThe NAT scripts currently work, but the changes below decrease user
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 08:28:12 +0000 (09:28 +0100)]
The NAT scripts currently work, but the changes below decrease user
error and allow the netmask to be passed in.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
20 years agoHide the VMX cpu feature from unmodified Guests.
kaf24@firebug.cl.cam.ac.uk [Wed, 12 Oct 2005 08:27:28 +0000 (09:27 +0100)]
Hide the VMX cpu feature from unmodified Guests.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
20 years agoMerged
djm@kirby.fc.hp.com [Tue, 11 Oct 2005 22:57:44 +0000 (16:57 -0600)]
Merged

20 years agoFixes for correct itir handling in vcpu_translate (broke simulator)
djm@kirby.fc.hp.com [Tue, 11 Oct 2005 21:50:21 +0000 (15:50 -0600)]
Fixes for correct itir handling in vcpu_translate (broke simulator)

20 years agoMerged.
emellor@ewan [Tue, 11 Oct 2005 14:23:19 +0000 (15:23 +0100)]
Merged.

20 years agoBring out the common console-handling code from main.py and create.py.
emellor@ewan [Tue, 11 Oct 2005 14:01:43 +0000 (15:01 +0100)]
Bring out the common console-handling code from main.py and create.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded auxbin module, for handling auxillary binaries.
emellor@ewan [Tue, 11 Oct 2005 13:59:52 +0000 (14:59 +0100)]
Added auxbin module, for handling auxillary binaries.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove bang path.
emellor@ewan [Tue, 11 Oct 2005 13:57:28 +0000 (14:57 +0100)]
Remove bang path.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAllow parallel 32- and 64-bit Xen installations. Move xc_save, xc_restore,
emellor@ewan [Tue, 11 Oct 2005 13:55:12 +0000 (14:55 +0100)]
Allow parallel 32- and 64-bit Xen installations.  Move xc_save, xc_restore,
and xenconsole out of /usr/libexec/xen and into one of /usr/lib/xen/bin or
/usr/lib64/xen/bin.  Remove all the PATH hacking inside Xend, and rely upon
the PATH being set correctly from outside.  Added an auxbin module for
handling the hacky stuff.

Replace the few /usr/bin/python bang paths with /usr/bin/env python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded xsls to xenstore Makefile install dependencies to fix "make dist".
jrb44@freefall.cl.cam.ac.uk [Tue, 11 Oct 2005 13:26:23 +0000 (14:26 +0100)]
Added xsls to xenstore Makefile install dependencies to fix "make dist".

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoPublish the virtual console interface in public/io/console.h.
kaf24@firebug.cl.cam.ac.uk [Tue, 11 Oct 2005 13:14:54 +0000 (14:14 +0100)]
Publish the virtual console interface in public/io/console.h.
Make the ring buffers a powe-of-two in size.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoXenstore client library spawns a reader thread the first
kaf24@firebug.cl.cam.ac.uk [Tue, 11 Oct 2005 12:02:59 +0000 (13:02 +0100)]
Xenstore client library spawns a reader thread the first
time a watch is registered. Before this it is fine for
caller threads to read the comms channel directly as no
async messages will be received.

This avoids various user tools needlessly creating three
threads where one will do the job.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoEcho request and transaction identifiers in xenstored
kaf24@firebug.cl.cam.ac.uk [Tue, 11 Oct 2005 11:39:03 +0000 (12:39 +0100)]
Echo request and transaction identifiers in xenstored
replies (and set to zero for async watch events).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix xenbus internal join() function to be concurrency safe
kaf24@firebug.cl.cam.ac.uk [Tue, 11 Oct 2005 10:59:15 +0000 (11:59 +0100)]
Fix xenbus internal join() function to be concurrency safe
(no static string buffer).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdded missing global statement, to ensure that the logfilename variable is
emellor@ewan [Tue, 11 Oct 2005 09:33:31 +0000 (10:33 +0100)]
Added missing global statement, to ensure that the logfilename variable is
updated.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix broken xm commands.
emellor@ewan [Tue, 11 Oct 2005 09:32:03 +0000 (10:32 +0100)]
Fix broken xm commands.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded doccomment.
emellor@ewan [Tue, 11 Oct 2005 09:30:13 +0000 (10:30 +0100)]
Added doccomment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded xsls utility, which recursively lists the contents of the store.
emellor@ewan [Tue, 11 Oct 2005 09:29:29 +0000 (10:29 +0100)]
Added xsls utility, which recursively lists the contents of the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix 64-bit compile of pygrub. From Charles Duffy.
kaf24@firebug.cl.cam.ac.uk [Tue, 11 Oct 2005 09:03:54 +0000 (10:03 +0100)]
Fix 64-bit compile of pygrub. From Charles Duffy.

20 years agoFix the legacy %-build targets for dist installation of
kaf24@firebug.cl.cam.ac.uk [Tue, 11 Oct 2005 09:01:23 +0000 (10:01 +0100)]
Fix the legacy %-build targets for dist installation of
guest kernels.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix for "unsubscriptable object" error, courtesy of Kurt Garloff
emellor@ewan [Mon, 10 Oct 2005 23:03:00 +0000 (00:03 +0100)]
Fix for "unsubscriptable object" error, courtesy of Kurt Garloff
<garloff@suse.de> -- missing comma in op_mem_target_set.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix changeset banner for source tarballs.
kaf24@firebug.cl.cam.ac.uk [Mon, 10 Oct 2005 20:45:31 +0000 (21:45 +0100)]
Fix changeset banner for source tarballs.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoLocal repo version number in Xen boot log.
kaf24@firebug.cl.cam.ac.uk [Mon, 10 Oct 2005 20:08:16 +0000 (21:08 +0100)]
Local repo version number in Xen boot log.
Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoKernel makefiles do not define $(LN).
kaf24@firebug.cl.cam.ac.uk [Mon, 10 Oct 2005 19:56:46 +0000 (20:56 +0100)]
Kernel makefiles do not define $(LN).
Signed-off-by: Rik van Riel <riel@redhat.com>
20 years agoThis patch fixes an error in the xm create path when the
emellor@ewan [Mon, 10 Oct 2005 18:06:14 +0000 (19:06 +0100)]
This patch fixes an error in the xm create path when the
xc.domain_create call fails (eg, when ACM policy prevents creation of a
domain).  When xc.domain_create fails, dompath never gets set.

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
20 years agoWhen a domain is introduced to xenstored, check whether this has already
emellor@ewan [Mon, 10 Oct 2005 18:04:03 +0000 (19:04 +0100)]
When a domain is introduced to xenstored, check whether this has already
happened, and only return EINVAL if the event channel details have changed.
This allows Xend to introduce domains when it starts without having to be
concerned about whether xenstored has restarted at the same time.  This
behaviour used to be subsumed by the bind_interdomain semantics for existing
channels, but in the simplification of that interface, the check must now move
to userspace.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMention -s option in usage.
emellor@ewan [Mon, 10 Oct 2005 17:59:57 +0000 (18:59 +0100)]
Mention -s option in usage.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix completely broken xenstore_read function.
emellor@ewan [Mon, 10 Oct 2005 17:58:46 +0000 (18:58 +0100)]
Fix completely broken xenstore_read function.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix cancellation of pending watch events on watch unregistration.
kaf24@firebug.cl.cam.ac.uk [Mon, 10 Oct 2005 17:16:03 +0000 (18:16 +0100)]
Fix cancellation of pending watch events on watch unregistration.
Use wait_event_interruptible() so that our kernel threads spend
their time in the more acceptable 'S' state rather than the more
worrying 'D' state.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFire watch callbacks on their own workqueue. Mainly this is
kaf24@firebug.cl.cam.ac.uk [Mon, 10 Oct 2005 15:57:41 +0000 (16:57 +0100)]
Fire watch callbacks on their own workqueue. Mainly this is
to make debugging easier (it's hard if an error takes out
the default workqueue!). Also, watch callbacks can be
arbitrarily long-lived, so it's more polite.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@ewan [Mon, 10 Oct 2005 15:16:41 +0000 (16:16 +0100)]
Merged.

20 years agoRewritten XendLogging to not be a singleton class, and not have methods used
emellor@ewan [Mon, 10 Oct 2005 15:15:48 +0000 (16:15 +0100)]
Rewritten XendLogging to not be a singleton class, and not have methods used
from nowhere at all.

Log to a temporary file if permission is denied to log to /var/log/xend.log,
as happens when you are not root.  Fixes bug #305.

Remove all the log-related garbage from XendRoot -- just about every module
was going straight to XendLogging.log already, so there was no need to have
XendRoot replicate this functionality.

Remove XendRoot.event_handler, which hasn't been in use since the EventServer
was removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoxenstored now supports multiple concurrent transactions per
kaf24@firebug.cl.cam.ac.uk [Mon, 10 Oct 2005 14:38:01 +0000 (15:38 +0100)]
xenstored now supports multiple concurrent transactions per
connection, plus interleaving of transactional and
non-transactional accesses. A transaction identifier is added
to the xsd_sockmsg header structure (0 means 'not in context
of a transaction'). The user and kernel xs interfaces accept
a pointer to a transaction handle where appropriate --
currently this is directly cast to an integer identifier in
the client library / kernel driver, but will allow for keeping
extra dynamic client-side state in future if we need to.

The transaction mutex has now gone. It's replaced with a
read-write mutex, but this is only acquired for exclusive
access during suspend/resume, to ensure there are no in-progress
transactions.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@ewan [Mon, 10 Oct 2005 13:46:53 +0000 (14:46 +0100)]
Merged.

20 years agoAdded error logging to the block hotplug script, and support facilities for
emellor@ewan [Mon, 10 Oct 2005 13:42:38 +0000 (14:42 +0100)]
Added error logging to the block hotplug script, and support facilities for
that.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNo need to gate xenstored reading requests from a
kaf24@firebug.cl.cam.ac.uk [Mon, 10 Oct 2005 10:37:10 +0000 (11:37 +0100)]
No need to gate xenstored reading requests from a
connection on whether there are pending replies/watches.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSimplify reply logic in xenstored. Maintain a linked list
kaf24@firebug.cl.cam.ac.uk [Sun, 9 Oct 2005 22:53:03 +0000 (23:53 +0100)]
Simplify reply logic in xenstored. Maintain a linked list
of pending replies that are sent out in order.

Currently we only read new requests when the reply list is
empty. In fact there is no good reason for this restriction.
Another interesting point is that (on my test machine)
hotplug blk setup fails if xenstored_client connects to
xenstored via the unix domain socket rather than through the
kernel --- this points to some user/kernel races that are
'fixed' by the extra serialisation of the in-kernel mutexes.
It definitely needs looking into.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoExtend xenbus/xenstore client interface to include a transaction
kaf24@firebug.cl.cam.ac.uk [Sun, 9 Oct 2005 20:29:10 +0000 (21:29 +0100)]
Extend xenbus/xenstore client interface to include a transaction
handle on appropriate operations. Next step is to plug this
through to the store daemon and get rid of the nasty serialisation
mutex for transactions.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdded some clarifying comments regarding xenbus/xenstore kernel startup.
smh22@firebug.cl.cam.ac.uk [Sun, 9 Oct 2005 19:55:53 +0000 (20:55 +0100)]
Added some clarifying comments regarding xenbus/xenstore kernel startup.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoRefactor xenbus to break up the xenbus_lock and permit watches
kaf24@firebug.cl.cam.ac.uk [Sun, 9 Oct 2005 17:52:54 +0000 (18:52 +0100)]
Refactor xenbus to break up the xenbus_lock and permit watches
to fire concurrently with request/reply pairs. Remove
watch_ack message: no longer needed.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoDon't increment mi->usage is alloc_major_info return NULL
vh249@kneesaa.uk.xensource.com [Sun, 9 Oct 2005 16:29:24 +0000 (12:29 -0400)]
Don't increment mi->usage is alloc_major_info return NULL

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFix cpu hotplug issue with SMP guests (including save/restore).
smh22@firebug.cl.cam.ac.uk [Sun, 9 Oct 2005 15:26:08 +0000 (16:26 +0100)]
Fix cpu hotplug issue with SMP guests (including save/restore).
Was a nasty one - worth ensuring we cast to u64 whenever playing
with Xen time values.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoConvert a few privops to existing hyperprivops in xenlinux
djm@kirby.fc.hp.com [Sun, 9 Oct 2005 15:04:49 +0000 (09:04 -0600)]
Convert a few privops to existing hyperprivops in xenlinux

20 years agoAlter logging statements to move the interpolation inside the logging function,
emellor@ewan [Sun, 9 Oct 2005 11:20:12 +0000 (12:20 +0100)]
Alter logging statements to move the interpolation inside the logging function,
meaning that it will only occur if the message is to be logged.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unnecessary extraction of ssidref from config inside restore -- this
emellor@ewan [Sun, 9 Oct 2005 11:16:23 +0000 (12:16 +0100)]
Remove unnecessary extraction of ssidref from config inside restore -- this
is now handled by the construct call, which restore has recently started using.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years ago/home/emellor/log2
emellor@ewan [Sun, 9 Oct 2005 11:14:46 +0000 (12:14 +0100)]
/home/emellor/log2

20 years agoRemove cruft.
emellor@ewan [Sun, 9 Oct 2005 10:59:37 +0000 (11:59 +0100)]
Remove cruft.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove code seeding RNG from /dev/urandom. The random module's default RNG is
emellor@ewan [Sun, 9 Oct 2005 10:57:24 +0000 (11:57 +0100)]
Remove code seeding RNG from /dev/urandom.  The random module's default RNG is
already seeded from the clock, so this is unnecessary, non-portable, and
expensive.  This should improve start-up time of Xend.  Replace twisty maze of
code with something sensible.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAppend a newline to error messages, so that they are parsed by XendCheckpoint.py
emellor@ewan [Sun, 9 Oct 2005 10:53:34 +0000 (11:53 +0100)]
Append a newline to error messages, so that they are parsed by XendCheckpoint.py
correctly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange xenbus callbacks to match new signature of xenbus_watch.
emellor@ewan [Sun, 9 Oct 2005 10:52:24 +0000 (11:52 +0100)]
Change xenbus callbacks to match new signature of xenbus_watch.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoStill more updating ia64 to xen-unstable
djm@kirby.fc.hp.com [Sun, 9 Oct 2005 04:55:14 +0000 (22:55 -0600)]
Still more updating ia64 to xen-unstable

20 years agoMore updating ia64 to latest xen-unstable
djm@kirby.fc.hp.com [Sun, 9 Oct 2005 04:28:02 +0000 (22:28 -0600)]
More updating ia64 to latest xen-unstable

20 years agoUpdate ia64 to keep up with core changes
djm@kirby.fc.hp.com [Sat, 8 Oct 2005 20:28:56 +0000 (14:28 -0600)]
Update ia64 to keep up with core changes

20 years agoMerge
djm@kirby.fc.hp.com [Sat, 8 Oct 2005 20:28:24 +0000 (14:28 -0600)]
Merge

20 years agoMake libxenstore thread-safe. It also spawns an internal
kaf24@firebug.cl.cam.ac.uk [Sat, 8 Oct 2005 18:19:27 +0000 (19:19 +0100)]
Make libxenstore thread-safe. It also spawns an internal
thread to read messages from the comms channel.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd support for fast mov_to_kr privops
djm@kirby.fc.hp.com [Sat, 8 Oct 2005 17:37:45 +0000 (11:37 -0600)]
Add support for fast mov_to_kr privops
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>